package com.example.musictutor.factories;

import com.example.musictutor.domain.ProgressHistory;

import java.util.HashMap;

/**
 * Created by ironhulk on 2014/05/11.
 */
public class ProgressHistoryFactory {

    public static ProgressHistory createProgressHistory(long id,HashMap<String,Integer> progressHistoryValues){
        ProgressHistory ph = new ProgressHistory();

        ph.setId(id);
        ph.setAmountOfAttempts(progressHistoryValues.get("amountOfAttempts"));
        ph.setAmountPassed(progressHistoryValues.get("amountPassed"));
        ph.setAmountFailed(progressHistoryValues.get("amountFailed"));
        ph.setLevel(progressHistoryValues.get("level"));
        ph.setSongId(progressHistoryValues.get("songId"));

        return ph;
    }

}
